package drds.configuration.db.xml_mapping.dynamic_tag.sql_template;

import drds.configuration.db.xml_mapping.configuration.Configuration;
import drds.configuration.db.xml_mapping.dynamic_tag.token_handler.PreparedParameterMapping;
import lombok.Getter;
import lombok.Setter;

import java.util.List;
import java.util.Map;


public class StaticSqlTemplate extends AbstractSqlTemplate {
    @Setter
    @Getter
    private final String sql;
    @Setter
    @Getter
    private final List<PreparedParameterMapping> preparedParameterMappingList;
    @Setter
    @Getter
    private final Configuration configuration;


    public StaticSqlTemplate(Configuration configuration, String sql, List<PreparedParameterMapping> preparedParameterMappingList) {
        super(configuration);
        this.sql = sql;
        this.preparedParameterMappingList = preparedParameterMappingList;
        this.configuration = configuration;
    }

    @Override
    public Bind bindWith(Map<String, Object> parameterObject) {
        return new Bind(sql, preparedParameterMappingList, parameterObject);
    }

}
